package com.xiaoxiong.gobang.bean;

import com.xiaoxiong.gobang.ai.Searcher;

/**
 * @author xiaoxiong
 * @Package com.xiaoxiong.gobang.bean
 * @Description:电脑玩家
 * @email 249900679@qq.com
 * @date 2016/4/2 0:11
 */
public class ComputerPlayer extends Player {
    private Searcher m_searcher;
    private int m_depth;

    public ComputerPlayer(String name) {
        super(name);
    }

    @Override
    public int GetNextPosition() {
        return m_searcher.SearchBestPlay(m_state, m_depth);
    }

    @Override
    public boolean isAi() {
        return true;
    }

    public void SetSearcher(Searcher searcher, int m_depth) {
        this.m_searcher = searcher;
        this.m_depth = m_depth;
    }
}
